load("@fbcode_macros//build_defs/lib:rust_oss.bzl", "rust_oss")
load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("scm_server_infra")

rust_library(
    name = "executor_lib",
    srcs = glob(["src/**/*.rs"]),
    named_deps = {
        "folly-logging": "//common/rust/folly/logging:logging",
    },
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:clap",
        "fbsource//third-party/rust:tokio",
        "//common/rust/shardmanager:shardmanager_lib",
        "//common/rust/shed/fbinit:fbinit",
        "//eden/mononoke/cmdlib/sharding_ext:sharding_ext",
    ] + ([] if rust_oss.is_oss_build() else [
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:tracing",
        "//common/rust/shed/stats:stats",
        "//common/rust/shed/justknobs_stub:justknobs",
    ]),
)
